package io.gitee.chearnee.fw.sidecar.model;

import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;
import java.time.ZoneOffset;

/**
 * @author cn
 * @version 1.0
 * @description
 * @date 12/19/2022 5:12 PM
 */
@Getter
@Setter
public class ApplicationRes {
    private String appId;
    private String accessToken;
    private Long expiresIn = 0L;

    public LocalDateTime getExpirationTime() {
        return LocalDateTime.ofEpochSecond(expiresIn / 1000L, 0, ZoneOffset.ofHours(8));
    }
}
